package org.cmcc.pcap.voltePcapParse.pcap;


/**
 * UDP 包头：由4个域组成，每个域各占用2个字节
 * @author starfish
 *
 */
public class UDPHeader {
	
	private String srcPort;			// 源端口
	private String dstPort;			// 目的端口
	private int length;			// 数据包长
	private String checkSum;		// 校验和
	
	public String getSrcPort() {
		return srcPort;
	}

	public void setSrcPort(String srcPort) {
		this.srcPort = srcPort;
	}

	public String getDstPort() {
		return dstPort;
	}

	public void setDstPort(String dstPort) {
		this.dstPort = dstPort;
	}

	public int getLength() {
		return length;
	}

	public void setLength(int length) {
		this.length = length;
	}

	public String getCheckSum() {
		return checkSum;
	}

	public void setCheckSum(String checkSum) {
		this.checkSum = checkSum;
	}

	public UDPHeader() {}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "<b>User Datagram Protocol,Src Port:</b>" + srcPort+",<b>Dst Port:</b>"+ dstPort
		+ "<br>&nbsp;&nbsp;<b>Source Port:</b>" + srcPort
		+ "<br>&nbsp;&nbsp;<b>Destnation Port:</b>" + dstPort
		+ "<br>&nbsp;&nbsp;<b>Length:</b>" + length+"bytes"
		+ "<br>&nbsp;&nbsp;<b>Checksum:</b>"+checkSum ;
	}
}
